

project(auth)

find_package(Qt5 COMPONENTS Widgets LinguistTools Network Xml REQUIRED)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

QT5_CREATE_TRANSLATION(QM_FILES ${CMAKE_CURRENT_SOURCE_DIR})
file(GLOB_RECURSE  SRCS CONFIGURE_DEPENDS ./*.cpp)
source_group_by_dir(SRCS)

add_library(${PROJECT_NAME} SHARED
     ${SRCS}
     ${QM_FILES}
	 res/auth.qrc
)
#add_custom_command(
#	TARGET ${PROJECT_NAME}
#	POST_BUILD
#	COMMAND "${CMAKE_COMMAND}" -E copy
#		"${QM_FILES}"
#		"$<TARGET_FILE_DIR:auth>/localization/"
#)

target_compile_options(${PROJECT_NAME} PRIVATE -DS_AUTH_DLL)
target_link_libraries(${PROJECT_NAME} PUBLIC Qt::Widgets Qt::Network Qt::Xml core guiframe widgets qbprotocol qbmessage qbkernel qbnet bondlib qbtools uam)
